import request from '@/utils/request'

// 查询仓库列表
export function listCangku(query) {
  return request({
    url: '/sparepart/cangku/list',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getCangku(cangkuId) {
  return request({
    url: '/sparepart/cangku/' + cangkuId,
    method: 'get'
  })
}

// 新增仓库
export function addCangku(data) {
  return request({
    url: '/sparepart/cangku',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateCangku(data) {
  return request({
    url: '/sparepart/cangku',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delCangku(data) {
  return request({
    url: '/sparepart/cangku/delcangku',
    method: 'delete',
    data:data
  })
}

// 导出仓库
export function exportCangku(query) {
  return request({
    url: '/sparepart/cangku/export',
    method: 'get',
    params: query
  })
}

// 修改仓库状态
export function changeUserStatus(userId, status) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/system/user/changeStatus',
    method: 'put',
    data: data
  })
}


